<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 创建通过类型的构造实例存放不重复的数字
        const s= new Set()
        s.add(1).add(2).add(3).add(2)
        // console.log(s)

        // forEach遍历
        s.forEach(i=>console.log(i))
        // for of遍历
        for(let i of s){
            console.log(i)  
        }
        
        

    </script>
</body>
</html>